#pragma once

#include <stdint.h>
#include "MemoryPool.h"
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/shared_ptr.hpp>

using boost::asio::ip::tcp;

class default_handler
{
	public:
		default_handler( boost::asio::io_service * );
		void start();
		void handle_read( const boost::system::error_code &error, uint32_t bytes_read );
		void handle_write( const boost::system::error_code &error );

		tcp::socket &socket() { return *_socket; }
	private:
		boost::shared_ptr<tcp::socket> _socket;
		enum { max_length = 512 };
		char data[max_length];
};

